import {
  Http
} from './http.js';
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const FORM = 'FORM';
const DELETE = 'DELETE';
const typeGET = 'application/x-www-form-urlencoded'
const typePOST = 'application/json'
const typeDELETE = 'application/json'

export class Index extends Http {
  constructor() {
      super();
  }
  // GET
  getRequest(data, type) {
      return this.request({
          url: 'v2/storage/list',
          method: GET,
          data: data,
          type: typeGET
      });
  }
  // POST 
  postRequest(data, type) {
      return this.request({
          url: 'v2/buyNeedAction/del',
          method: POST,
          data: data,
          type: typePOST
      });
  }
  // DELETE
  delRequest(data, type) {
    return this.request({
        url: 'v2/buyNeedAction/del',
        method: POST,
        data: data,
        type: typeDELETE
    });
}
}
